CXX = mpicxx
CXXFLAGS = -O2 -fopenmp

INCS = -I../include
LIBS = -L../lib -lyhamg -llapacke

all:test_laplace test_eig test_mtx

test_laplace:test_laplace.o
	$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
	rm -f test_laplace.o

test_eig:test_eig.o
	$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
	rm -f test_eig.o

test_mtx:test_mtx.o
	$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
	rm -f test_mtx.o

%.o:%.cpp
	$(CXX) $(CXXFLAGS) -c -o $@ $< $(INCS)

clean:
	rm -f test_laplace test_eig test_mtx
